package com.TeamJigsaw.DanteTrail.Views;

import javax.swing.*;
import com.TeamJigsaw.DanteTrail.Views.Interfaces.SplashInterface;

import net.miginfocom.swing.MigLayout;

import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.event.ActionListener;

public class SplashView extends JPanel implements SplashInterface{
	private static final long serialVersionUID = 1L;
	
	private JButton btnNewButton, btnNewButton_1;
	
	public SplashView() {
		setSize(new Dimension(700,700));
		initialize();
	}
	
	private void initialize()
	{
		setLayout(new MigLayout("", "[grow]", "[grow]"));

		JPanel panel = new JPanel(){
			@Override
			public void paintComponent(Graphics g) {
				super.paintComponent(g);
				ImageIcon img = new ImageIcon("resources\\splash_screen.jpg");
			    g.drawImage(img.getImage(), 0, 0, null);
			  }
		};
		add(panel, "cell 0 0,grow");
		panel.setLayout(new MigLayout("", "[200px:200:200px][300][200]", "[200][150][50.00:50:50][20:20:20][50:50:50][300]"));

		//JLabel lblDantesInferno = new JLabel("<html><font size=\"20\" color=\"#920F0F\"> Dante's Inferno</font></html>");
		//panel.add(lblDantesInferno, "cell 0 0 3 2,alignx center,aligny center");

		btnNewButton = new JButton("Play!");

		btnNewButton.putClientProperty("JComponent.sizeVariant", "large");
		panel.add(btnNewButton, "cell 1 2,grow");
		
		btnNewButton_1 = new JButton("Load");
		panel.add(btnNewButton_1, "cell 1 4,grow");

	}

	@Override
	public void setStartListener(ActionListener listen) {
		btnNewButton.addActionListener(listen);

	}

	@Override
	public void setLoadListener(ActionListener listen) {
		btnNewButton_1.addActionListener(listen);
		
	}
	
	


}
